package cn.itsource.org.service;


import cn.itsource.basic.exception.CustomException;
import cn.itsource.basic.query.BaseQuery;
import cn.itsource.basic.service.IBaseService;
import cn.itsource.basic.util.PageBean;
import cn.itsource.org.domain.Employee;

import java.util.List;


/**
 * 员工类的service接口
 */
public interface IEmployeeService {


    /**
     * 添加
     * @param employee
     */
    void save(Employee employee);
    /**
     * 根据id删除
     * @param id
     */
    void delete(Long id);
    /**
     * 修改
     * @param t
     */
    void update(Employee employee);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Employee selectById(Long id);

    /**
     * 查询全部
     * @return
     */
    List<Employee> selectAll();

    /**
     * 高级查询 分页查询
     * @param baseQuery
     * @return
     */
    PageBean<Employee> queryPage(BaseQuery baseQuery);

    /**
     * 通过用户名和密码查询员工对象
     * @param username
     * @param password
     * @return
     */
    Employee findByUsernameAndPassword(String username, String password) throws CustomException;


}
